package com.yupi.cli.pattern;

/**
 * 调用者，相当于遥控器
 */
public class RemoteControl {
    public Command getCommand() {
        return command;
    }

    private Command command;

    /**
     * 装上按键（命令）
     * @param command
     */
    public void setCommand(Command command) {
        this.command = command;
    }
    public void pressButton(){
        command.execute();
    }
}
